package org.feng.navigation.web.controller;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.feng.navigation.client.dto.MultiResponse;
import org.feng.navigation.client.dto.junzi.JunZiManagerDTO;
import org.feng.navigation.client.feign.JunZiNavigationApi;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * 菌子导航控制器WEB端
 *
 * @version V1.0
 * @author: junzi
 * @date: 2023年02月01日 09时53分
 */
@Slf4j
@Api(tags = "菌子导航控制器WEB")
@RestController
@RequestMapping("/junzi")
public class JunZiNavigationController {

    @Resource
    private JunZiNavigationApi junZiNavigationApi;

    @ApiOperation(value = "测试-列出 junzi_manager 表的数据", notes = "测试")
    @PostMapping("/listJunZiManager")
    public MultiResponse<JunZiManagerDTO> listJunZiManager() {
        log.info("使用 Feign 调用 listJunZiManager");
        return junZiNavigationApi.listJunZiManager();
    }
}
